<template>
	<view class="">
		<!-- 页面分享和海报生成按钮 -->
		<anniu :fxinfo="fxinfo"></anniu>
		<!-- 海报生成展示 -->
		<fenxiangs v-if="shareis" :shareInfo="shareInfo"></fenxiangs>
	</view>
</template>

<script>
	import anniu from '../../components/haibao/anniu.vue'
	import fenxiangs from '../../components/haibao/haibao.vue'
	export default {
		components:{anniu,fenxiangs},
		data() {
			return {
				fxinfo: {//生成海报基础信息
					isshow: false,
					waresId: '',
					typeImg: '/r/cms/www/zujianku/haibao/hb-beijing.jpg',
					name: "海上花岛",
					leixing: '景区门票',
					salePrice: 20,
					des: "上海市崇明区竖新镇前卫村801号",
					isshow: true,
					orderType: 1,
					headerImg: "/r/cms/www/zujianku/haibao/hb-touxiang.jpg",
					userName: "Main",
				},
				shareis:false,//海报显示隐藏
				shareInfo:{},//海报生成需要的信息
			}
		},
		onLoad(options) {
			uni.setNavigationBarTitle({
				title:options.name
			})
		},
		onShow() {
			var that=this;
			uni.$on('schb',function(res){//全局事件接收海报信息
				if(res.json!=''){
					that.shareInfo=res.json;
				}
				that.shareis=res.show
			})
		},
		methods: {

		}
	}
</script>

<style>
</style>
